from peewee import *
import os

# 使用绝对路径
current_dir = os.path.join(os.path.dirname(__file__))
db_name = "{}/admin.db".format(current_dir)
db = SqliteDatabase(db_name)

# 必须要要放在db之后,防止循环导入
from apps.db.students import Student

db.connect()
db.create_tables([Student])
